/*
 * ecmsock.c - Socket & network related
 * Clunix, cezanne@clunix.com, 2004.10
 *
 * Copyright (c) 2004 by Clunix Inc. All Rights Reserved.
 */
#include "config.h"

#ifdef _WIN32
#include <winsock2.h>
#endif

#include "ecm.h"

ECMBOOL
ecm_inet_aton(const char *ipstr, struct in_addr *paddr)
{
#ifndef _WIN32
	if (inet_aton(ipstr, paddr) == 0)
#else
	if ((paddr->s_addr = inet_addr(ipstr)) == INADDR_NONE)
#endif
		return ECM_FALSE;
	return ECM_TRUE;
}
